<script language="javascript">
<!--
function f_setVaildDate() {
	var startDate = document.all("contract_mat_detail.st_delivery_date").value;
	var endDate = document.all("contract_mat_detail.ed_delivery_date").value;

	var curKeyID = document.all("contract_mat_detail.contract_detail_id").value;
	var ContractID = document.all("contract_mat_detail.contract_id").value;

	if (startDate == "" && endDate == "") {
		return ;
	}

	var action = document.forms(formName).action.split("?")[0];

	action += "?startDate=" + startDate;
	action += "&endDate=" + endDate;
	action += "&curKeyID=" + curKeyID;
	action += "&ContractID=" + ContractID;
	document.all("setVaildDate").disabled = true;

	document.forms(formName).action = action;
	document.forms(formName).ActionType.value = "setVaildDate";
	document.forms(formName).target = "frmfhidden";

	document.forms(formName).submit();
}
//-->
</script>